//===============================================================================
// Microsoft patterns & practices Enterprise Library Contribution
// Mapping Application Block
//===============================================================================

using System;
using Microsoft.Practices.EnterpriseLibrary.Configuration.Design;

namespace EntLibContrib.Mapping.Configuration.Design
{
	/// <summary>
	/// Represents a command for adding the Mapping Application Block to the current application.
	/// When this command is executed it will build the default node hierarchy for this block.
	/// </summary>
	public class AddMappingSettingsNodeCommand : AddChildNodeCommand
	{
		#region Construction
		/// <summary>
		/// Initialize a new instance of the <see cref="AddMappingSettingsNodeCommand"/> class with an <see cref="IServiceProvider"/>.
		/// </summary>
		/// <param name="serviceProvider">A mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
		public AddMappingSettingsNodeCommand(IServiceProvider serviceProvider)
			: base(serviceProvider, typeof(MappingSettingsNode))
		{
		}
		#endregion

		#region Protected Methods
		/// <summary>
		/// After the <see cref="MappingSettingsNode"/> is added, adds the default start-up nodes.
		/// </summary>
		/// <param name="node">The <see cref="MappingSettingsNode"/>.</param>
		protected override void ExecuteCore(ConfigurationNode node)
		{
			base.ExecuteCore(node);
		}
		#endregion
	}
}